<?php
include 'debut.php';
?>
<script type="text/javascript">
	$(document).ready(function (){
		$('.carousel').carousel();
	});
</script>
<body>
<?php include 'menu.php'; 

echo $_SESSION['admin'];
// Fichier et nouvelle taille
$filenames = array('img/pots.jpg','img/paint.jpg');
$i=1;
foreach($filenames as $filename){
	
	// Calcul des nouvelles dimensions
	list($width, $height) = getimagesize($filename);
	$newwidth = 750;
	$newheight = 550;

	// Chargement
	$thumb = imagecreatetruecolor($newwidth, $newheight);
	$source = imagecreatefromjpeg($filename);

	// Redimensionnement
	imagecopyresized($thumb, $source, 0, 0, 0, 0, $newwidth, $newheight, $width, $height);

	// Affichage
	imagejpeg($thumb, "./img/redim/$i.jpg");
	$i++;
}
?>     
      
      
<div class="container">
	<div class="page-header">
	 <h1>Accueil</h1>
	</div>
	<div class="row">
		<div class="col-lg-8  col-xs-12" >
			<div id="myCarousel" class="carousel slide">
			  <!-- Indicators -->
			  <ol class="carousel-indicators">
				<li data-target="#myCarousel" data-slide-to="0" class="active"></li>
				<li data-target="#myCarousel" data-slide-to="1"></li>
				<li data-target="#myCarousel" data-slide-to="2"></li>
			  </ol>
			  <div class="carousel-inner">
				<div class="item active">
				  <img src="img/redim/1.jpg" alt="First slide">
				  <div class="container">
					<div class="carousel-caption">
					  <h1>Tableau du mois</h1>
					  <p><a class="btn btn-large btn-primary" href="photos.php">Découvrir les photos</a></p>
					</div>
				  </div>
				</div>
				<div class="item">
				   <img src="img/redim/2.jpg" alt="Second slide">
				  <div class="container">
					<div class="carousel-caption">
					  <h1>Tableau du mois</h1>
					  <p><a class="btn btn-large btn-primary" href="photos.php">Découvrir les photos</a></p>
					</div>
				  </div>
				</div>
				<div class="item">
				   <img src="img/redim/3.jpg"  alt="First slide" alt="Third slide">
				  <div class="container">
					<div class="carousel-caption">
					  <h1>Tableau du mois</h1>
					  <p><a class="btn btn-large btn-primary" href="photos.php">Découvrir les photos</a></p>
					</div>
				  </div>
				</div>
			  </div>
			  <a class="left carousel-control" href="#myCarousel" data-slide="prev"><span class="glyphicon glyphicon-chevron-left"></span></a>
			  <a class="right carousel-control" href="#myCarousel" data-slide="next"><span class="glyphicon glyphicon-chevron-right"></span></a>
			</div><!-- /.carousel -->
		</div>
		<div class="col-lg-4 col-xs-12">
			<div class="panel panel-default test">
			  <div class="panel-heading">
				<h2 class="panel-title">Dernières news</h2>
			  </div>
			  <div class="panel-body">
				Voici les dernières news
			  </div>
			</div>
		</div>
	</div>
</div>
</body>
</html>
